<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>用户角色管理</title>
</head>
<body>
	<div id="layout" class="easyui-layout" style="width: 100%; height: 100%; background: #fff;">
		<!-- 查询条件 开始 -->
		<jsp:include page="vo/conditionVO.jsp"></jsp:include>
		<!-- 查询条件 结束 -->
		<jsp:include page="page/listComponent.jsp"></jsp:include>
	</div>

	<!-- EASYUI dialog -->
	<div id="easyuiDialog"></div>
    <!-- datagird默认初始化url-->
    <script type="text/javascript"> gridDataUrl = '${base}/system/user/role/UserRoleController/queryPaged'; </script>
    <!-- 公用方法-->
    <script type="text/javascript" src="${base}/common/js/listPageMaster.js"></script>
    <!-- 新增，编辑 ，删除 ，查看 js方法-->
	<script type="text/javascript">
		//查看动作
		function show() {
			var row = $("#tblGrid").datagrid("getSelected");
			if (row == null) {
				$.messager.alert('提示', '请选择要查看的数据', 'info');
				return;
			}
			//$("#save").remove();
			var showUrl = "${base}/system/user/role/UserRoleController/show/" + row.id;
			openEasyuiDialog("用户角色查看", showUrl, 500, 500);
		}
	
		//新增动作
		function add() {
			var addUrl = "${base}/system/user/role/UserRoleController/goAddPage";
			openEasyuiDialog("用户角色新增", addUrl, 500, 500);
		}
		//编辑动作
		function edit() {
			var row = $("#tblGrid").datagrid("getSelected");
			if (row == null) {
				$.messager.alert('提示', '请选择要编辑的数据', 'info');
				return;
			}
			var editUrl = "${base}/system/user/role/UserRoleController/edit/" + row.id;
			openEasyuiDialog("用户角色编辑", editUrl, 500, 500);
		}
	
		//删除动作
		function deleteRow() {
			var deleteUrl = "${base}/system/user/role/UserRoleController/delete";
			var row = $("#tblGrid").datagrid("getSelected");
			if (!row) {
				$.messager.alert('提示', '请选择要删除的数据', 'info');
				return;
			}
			$.messager.confirm('提示', '确定要删除吗？', function(r) {
				if (r) {
					doDeleteRow(deleteUrl, {
						"id" : row.id
					});
				}
			});
		}
	</script>
</body>
</html>
